//
// IOperand.hh for Ioperand in /home/haz3/AbstractVm
// 
// Made by Maxime Wojciak
// Login   <wojcia_m@epitech.net>
// 
// Started on  Fri Feb  8 16:57:19 2013 Maxime Wojciak
// Last update Mon Feb 18 13:32:58 2013 Maxime Wojciak
//
#ifndef __IOPERAND__
#define	__IOPERAND__

#include	<iostream>
#include	<string>

class IOperand {

public:
  enum eOperandType {
    Int8,
    Int16,
    Int32,
    Float,
    Double
  };

public:
  virtual std::string const &toString() const = 0; // Renvoie une string reprensentant l’instance
  virtual int getPrecision() const = 0; // Renvoie la precision du type de l’instance
  virtual eOperandType getType() const = 0; // Renvoie le type de l’instance. Voir plus bas
  virtual IOperand *operator+(const IOperand &rhs) const = 0; // Somme
  virtual IOperand *operator-(const IOperand &rhs) const =  0; // Difference
  virtual IOperand *operator*(const IOperand &rhs) const = 0; // Produit
  virtual IOperand *operator/(const IOperand &rhs) const = 0;  // Quotient
  virtual IOperand *operator%(const IOperand &rhs) const = 0; //  Modulo
  virtual ~IOperand() {}
};

#endif /* __IOPERAND__ */
